canonical_string refactoring + fix typing in middleware comment
Merge pull request #53 from vitoordaz/master

canonical_string refactoring + fix typing in middleware comment