Remove redundant functions and imports