Fix error in NOECHO handling
Big overhauling of the build scripts. Now everything seems to work automatically.