Refactored parser.

The parser has been refactored, along with the core data structure for
representing expressions in memory. This involved a more heavy utilization
of OOP for the data structures.