This if/else could be simplified. Just set `orient_prior` before the if, and combine the `if/else` into a single `if`.