Fix remaining deprecated stuff
Temporary fixes for remaining errors
Remove old debug stuff