Remove debug comments and unnecessary reference code