Remove unused code
Remove inline from function templates