Fix search/replace errors, remove commented code