Fixed menu painting problem on simulator by replacing %20 characters in paths with spaces.

Added a data structure for tracking groupings and improved menu painting. Bug: Sometimes objects appear ungrouped when they should be grouped.