cleanup of some unused variables and enum types.