added new lines

Made the distance variable have the average of motors B & A.

Added a variable and changed were the distance variable was written.

Added comments to all the new stuff