Started adding some db related code