Implemented canonical extension filter with tests.