Added comments for this CONFUSING CODE AUGH.
Fixed the variable names. Much better! :3