Add groups and do some clean up. resolves #8