Work on unit tests for the controller. Fixed some bugs found by the unit tests.

Added mock settings class.

Added experimental configuration settings.