modifications and clean up. Error in quadraticInverse fn