Adding support for optional group attribute.  Refactoring a bit to allow for easier Spring configuration.