Coffeescript cleanup, courtesy of code review by @parkr