Partial move to literate Coffeescript. Remainder to follow.