Refactored DAO to Repository.
refactored to use content provider