(BY:mark) Major changes to index template file