Add convenience classes for common objects and clean up code a bit