Refactoring more of startup.js into modules