Add mongo connection, Hook up api to insert to mongo
minor cleanup