Reworked the index controller. Split resources into their own classes.