Improve build script for all this nonsense