hangman functions in coffeescript; fix view