Remove debug output and format code