Cleanup of build process, plus other minor clean up.