Code refactoring and test updates
Removed temp files