Added statistics and test cases.