made test script DRYer and removed some whitespace/rendundant comments