remove debug messages and update comments