Cleanup rule model

- Split group element into subclasses
- Added rule element visitor