Refactoring and additional tests.
Added validation on views.
Add SSL in production