Normalize map for boundary analysis

A couple other bug fixes