Bugfixing and switch to derby in memory db.