Removed the need to copy memory for template