Remove unused function and lxml import