remove debug output and excess whitespace