Cleaning up for PEP8 and modifying to use get_apps and get_models instead of ContentTypes