Refactor namespace/shortname parsing into own method

I've written a custom file loader in order for the namespace syntax to match across different resource loading classes. To achieve this I have to replace the loadTemplate method, which includes a lot of logic. While this logic may not be likely to change anytime soon, I'd feel better if the namespace parsing was extracted into its own method so I can replace just that bit.