DRY up the code a bit by using some hacked up version of CRTP