moved Database logic to its own function
Merge branch 'master' of https://github.com/ThatTreeOverThere/shazync