Changed the way in which two-way matches(unification) is performed.
Proper two-way pattern matching.

Also added a java swing entity viewer.
Fixed a few bugs in pattern matching.