variable names modified.
Database queries refactored.
Merge pull request #1 from radiusinc/feature/PDSC-9-refactor-database-queries

Feature/pdsc 9 refactor database queries