Added options, and smarter selecting template

Added options to the loadTemplate. Improved the function to also accept
just a selector, and now the template variable is smarter, attempting to
work out where it should load template from. There is also a setting to
help this out to speed the process up.