DB and concurrency issue

The Connection pool was creating multiple DB connections as they were
not being closed. at 197 pool concurrent the DB crashed. Implemented
the mongoclient standard pattern for Db closing and opening.