rearranged handleEvent, no structure changes.
new maps are only created when needed (see lines 88/89 and 111/112)
Authored by: juliakern 2014-01-27
Parent: [r27678]
Child: [r27680]