Removed type annotatiov from remove method otherwise it fails in checked mode.
Cleaned up remaining questionmark operators.
Added a test for template caching.