Namespaced models.

We ran into a similar issue as in #40. All the classes in the lib/models directory have been namespaced, and all calls to them updated with the namespace.