Reworked all with shunting yard algorithm.