some updates to the build process

updated some scripts in tools/
simplified and edited Makefile.am