makefile update + some fixes