Thank you @DannyHamilton and @achow101. I have made the following changes as suggested:
-Fixed phrasing to use "greater than or equal to the sum of the value of inputs"
-Added "d" to "ripem" hash name, fixed in the illustrations
-Swaped the locking and unlocking scripts. You are right, the scriptPubKey is commonly called the locking part of the script
-Updated to correct work "throw an error"
-changed commission to transaction fee
-noted that this example considers the p2pkh but other scripts are possible.