Implemented connectDB, as described in #3 (closed); 1st commit introduced the check if connected to DB and make collections, 2nd commit made it fit the requirements and improved the code by adding error handling.
connectDB
Closes #6 (closed)