Refactored to support regression testing vs c-implementation
Added scripts to make regression tests