Refactor: Keep db stuff together