Clean up obsolete build scripts and make the tests work again