Reworked substring index variables, to make it more "futureproof"
Framework added for keep checking until below certain price
Added comments, message to indicate how many times it checked
Moved main block into function, made it spit that back into discount pricing
Just added a few more comments to make things clearer