Improve test script and general style