If you’re linking between templates in the same group, you shouldn’t need to include the template group in your URL structure.
For example, try looking at this page: http://mysite.com/final/gallery. And then try looking at this one: http://mysite.com/gallery (using your site’s base URL, of course).
Are they the same?
If so, then you’ll see that you can create URLs in your templates that don’t explicitly make reference to the template group. So you could have a link in your template that looked like this
<a href="http://{title_permalink=final/detail}">{title}</a>
that would lead to exactly the same place as
<a href="http://{title_permalink=detail}">{title}</a>
And the URL would contain the template group only if you set it to.
The only rule here is that if you’re going to leave out the template group, the template that you’re linking from and the template that you’re linking to must be in the same group.
Try it.