improve tests, views and controllers