improved hints
fixed issue with template image being unnecessarily preloaded
moved into extension method