Refactor and comment scaffold.coffee