Add more tests and small refactoring

 - Add integration tests (using capy:bara with selenium driver)
 - Small fix of model tests
 - Views cosmetic refactor