Remove debug code
Employ template inheritance