Refactor template parsing

Also add template function to format wiki page names
Utilize new wiki page name formatting function