fixed some pep8 errors and adjusted response formats after testing against live mongo instance