Starts the refactoring and adds more tests.
Javascript refactoring.
Refactoring application controller.
More refactoring.
Changes gitignore.