removes some extraneous code