Added comments and removed debugging