week01: Free memory and change function types in test.