Added support for quadratic equations

Fixed previous revision.  Now solves quadratic equations correctly!