Fixed indentation, blank lines and imports according to Python style guidelines