creates repr function
creates a dictionary function
fix some pep8 errors