Updated comments and removed unnecessary code.