Added database support along with test activity for database access, reorginized files and added comments