Replace mysql database with H2 & minor refactoring