Added loopsidwrapper smarty plugin + template adjustments