DatabaseAdapter fix

Fixed DatabaseAdapter and classes so that singleton is called and works
correctly.