remove some very horrible code, a little work toward merging multiple gr...

...oupings but it's too difficult for this ticket, fixes #157