q1: Some issues spotted
q1: Remove redundant variable
q1: It works!

Damn you floating point equality (or lack thereof)
q1: Fix step sizes