Changed to use the DAO pattern from another project.