Move code over to coffeescript, closes #6.