Fixed up controller and set up the configuration for testing using Jasmine.