Moved from template to ElementTree