Started cleaning up code
Did some refactoring and cleaning up, using the .format method instead of old '%s' % (smth)