Remove unused optimization functions