Rewrite Cartier

Because maintainability.