Initial commit for cleanup

Refactored, renamed and restructured codebase