Completed initial refactoring

Initial structure built