integrate index and page templates together more