Fixing build errors

I'm trying to make the builds pass again. I noticed debugger had been removed in a previous commit but parts of it were still around and I think causing the builds to fail, so starting with that first.