Build process improvements and fixes. Header fixes.