Get rid of some warnings, improve build process