Small fixes and fixes to build process.