refactor end to end tests

Cleanup end to end test script