Makefile & unittest fixes