Fixed dumb mistake + PEP-8 overhaul + some refactoring