fixed minor bugs

Using improved walk to find a cycle in Pollard's Rho and remove some
dead and unimportant code.