Removed unnecessary code and updated style