Rel 3 3

optimizing and enhancing current template engine