Remove unused elements in define