added doc and refactor PostfixMachine