Cut ToPostfix into functions