Some fixes to make it all compile.