Added util tests and improved Makefiles