Remove unnecessary code & fix formatting