-Implemented rules 2 and 4, finishing the algorithm.
-Added the equals methods to the tuple types.
-Refactored code.