final changes to the multi-channel approach, code clean-up, added documentation, and function renamed to erGrouping.