Unit tests for the client controller
Moved creation of the auto index to its own file.
Merge.