Added unit test and valgrind test for each components.