Refactor the input test
Cleanup