added database submodule and refactored postgresql install