Updated comments and removed unused code.