Refactor front-end code, remove redundancies

Also, removed animation from message that did not complete reliably.
Merge pull request #197 from subugoe/refactor

Refactor front-end code, remove redundancies