Fix the constructors to actually work

And not just produce memory leaks.