Remove bad references in comments and code