Fix test.sh again, modularize input