Change core app code to comply with PEP8