Rewrited to object system - templates ajaxpage