refactor: clean up root.coffee a bit