Improved templates sistem