Remove debug output and add comments