Refactoring: Extracts DB access