Fixed scripts and two makefiles