You can't make a complicated problem simple. But, by leveraging the right tools in your language (and the Visitor pattern) you can ensure that your code doesn't get as complicated as your problem. In ...