Cleanup and refactor acceptance test