Removed unnecessary code and formatting fixes