Some fixes that make the tests run and updated makefile