remove unused code and config