Added import statements, corrected for PEP8