Trying to fix the code.
Updated Makefile for tests.
Added valgrind suppression rules.
Fixed some more tests