Refactor build_choc.sh