Integrate sn.datumLoader helper; tweak for JSLint errors.
Don't define stack function within loop.
Minor tweaks.