breaking out device and index controllers and view