problem while increasing motor speed

Why do repeat so much code?
Why do you assign variables to themselves?
Where are the comments?
Where are the code tags?