fix coffeelint errors

Fix errors raised by RTD, and some of the coffee issues I raised in the code review for those files.

Also did a rebase from alpha. Make sure to do this everytime you start working on CM.