Build fixes (mostly dead code)

Some of the errors were in Vala-generated code, but I didn't see the
original vala files...