rearranged architecture a bit to separate template index and static template styles