remove debug messages and fix comments