Removing extraneous element