Initial commit
Refactored code