add Makefile
remove unused variable
add valgrind stack register and deregister