Cleanup the insertExtra function a little.