Cut down big ugly pathfind if-else to a small ugly pathfind if-else