Added tests for Stats class. Index.php now can include different test files rather than having tests in its body directly.