When removing element, remove it also from group; Remove group if it is empty.
Better naming
Merge pull request #76 from rn0/issue_73

When removing element, remove it also from group and remove group if it is empty.