Refactor init.coffee and config