refactored data access layer
Merge remote-tracking branch 'origin/master'