CRTP

Some minor work to CRTP