remove unused code and imports