removes extraneous code