Fixed all the main warnings and made the code PEP8 standard