Some API modifications to be compatible with template extensions