Add the ability to handle elements as templates