Changed view and index controller to use API
Added autofac