Refactor presubmit.sh