Moved index to template