Added HQL tests
added hsqldb and some minor refactoring