Remove unused function and config