Refactor and Repair
Repair Tests
fix for release