cleaned up the index controller module