General Bug fixes and Improved GUI

Now highlights the table of the last gate in the truth table.