Removed test files. Refactored code.