Fully functional parsing algorithm

Implemented proper parentheses compatibility
More compact helper methods
Re-implemented some infix operations