Fixed styling and separated app / controller code.

Closes issues #2 and #3.