Use instancetype instead of redeclaring methods.
Implemented template substitution methods.