work on modularizing app
add method to disconnect from mongodb so app will exit