Refactor PS1 format