Merges some build fixes.
Merge pull request #422 from emamanto/overhaul_master

Build fixes