fixed some pep8 and adjusted response formats