introduce type aliases RewriteRule and RenderFunction and use them
throughout the code base for improved readability