Refactor person position code