Improved timing code and expanded to cover more tests.