rework canonical lib into an seo lib with more features