finalizing mongodb connection details, doing some cleanup...