Reorganization of code

Having all the code in a single place seems to be a bad idea. Makes it harder to figure out what's going on and to trace through the code.

This pull separates out all the pieces and organizes the namespaces a little bit more clearly.

NOTE: also includes the AR#Inflector commit made earlier (separate pull request #66)