map handling corrections, cleanup