Fix implicit and unwanted copying and use two already existing typedefs.