Remove unused code and imports