Improved simplification algorithm by fixing bugs with and, or, and xor
gates, and running until circuit cannot be simplified anymore.  Would be
interesting to check whether variable inputs is returning anything
useful (also, whether same output results after simplification).  Ran
some simplification/min-cut tests.