fix enums and edit templates