finish conversion to teacup and coffeescript