Cleanup and build improvements

@elingg PTAL
As mentioned above, this should be part of the build script