Remove unnecessary structure patterns