Remove unused function and imports