Attempt to somewhat clean up the shunting yard algorithm