Database abstraction layer is now working 100%