Added DataAccess Tests

DataAccess API tests added. Fixed a number of bugs.