Merge pull request #191 from iceglow/cleanup

Various fixes.
Build fixes.
Restructured the build.