code cleanup, added flag for extruding contacts