Implemented mapping to Tree datatype and pretty printing of resulting optimized expression.