Generate index controller