Improve this script to make it handle parameters more user-friendly.