Initial Testing and fixes

Resolved a slew of initial bugs and tests appear good on small dataset;