Separate template into index and m, both extending base.