Made most of the code follow pep8 standard