Remove unused CPP header template.
Implement isOptional.
Fixes remaining tests, except commit history.