Updated comments and removed extra code