Added sumMaxMinAvgTest.php
Small fixes and refactoring