refactored database access
Merge branch 'master' of github.com:userlocalhost2000/trema-satellite