Added config script. Done some modifications to script files and Makefile.