Added tests for frontend and database. Work with database is changed to hibernate