Some fixes to get code up to date and working