Updated makefile
Added testcases and cleaned up; investigate why testcases sometimes fail randomly