Extracting data access to dao.py