Remove unused function and variable