Updating template loader logic.