Removes obsolete code from template parsing