first working prototype.
fixed a lot of mistakes and converted the whole of XALTdb to the orm.