Replacing if else for ternary conditional
Adding condition to test
Separating development and test environments in different MongoDB dbs.
Small conditional refactor.
Refactor before test block.