refactor code into sensible files per the ember tutorial