js to coffeescript; edit feature already broken... TODO