Rework Makefile and fix build and run stages