completed cleaning up the core optimization engine, and the wrapper that reads data from bam files and runs the model.