Added $location dependency to index controller