Added basic test suite
Cleanup/Refactoring