tidied up some coffeescript