fix a bunch of implicit declarations