remove unused blocks in config