jquery incompatibility fix; refactor of stat model; template for stat helper