adapt to mapping changes, cleanup