smaller map resize code; format cleanup