Db connector refact