Debug and whitespace cleanup