Making more registration varaibles optional, cleanup, etc.