Completed specification for toPostFix, cleaned up code