Added a ternary to the script and extra comments.