removed more unnecessary code, still working on saving state of expanded
groups