More work on the hsql framework, not tested yet