Refactored, moved everything core related to be in core module rather than {root}main.js