Remove unnecessary instructions