Support for Grouping States

Added support for grouping states. What this means is that the server
can dynamically switch based on the URI the group of states that need to
serve the request.