Removed old optimized function template