PEP8, API interactions & minor fixes