Refactor value printer