Refactor software.sh