Added code to handle complex routing with branches
Merge pull request #471 from sgress454/hooks

Added code to handle complex routing with branches