Added a TitleResource class. This handles serialisation to json.

Cleaned up a bit of config.

Added index param to load api.