Reworked infix to postfix functionality