Further automate importing from upstream, remove some unused headers