Simplify collapse map conents, shuffle things around

There are almost no functional changes, just better organize what goes where