More build fixes. Added a few stubs and took out some duplication too.