Fix indentation and remove unnecessary code