got rid of all remaining Build code in here, stripped down the wrapper interface and moved everything into a separate header file.