Minor fixes and started work on DB class