Did some code cleanup
Reorganized testing