Minor changes to make it easier for template generation