Major fixes to build process to make it... y'know... work