Changed code to use newer ots-mongo-wrapper module. No need to pass db object around the application now. Only gets instantiated once when required more than once.