Clean up codes and Commit unit tests in test1.cpp;