improved makefile. Multiple fixes, better logging, removed hooks