Updated comments and removed debugging code