Moved TypeRegister to custom module, other changes