Fixed bug in mainTest, and removed the first/last call counts feature
function.