fix build environment, cleanups, etc.