basic cleanup. made printOrder() utility. created dereferenceGroups() and shrunk resolveDependencies()