Updated the Cube class so that it works with different truth values, including dontcares