Move path selection logic to controller
Hide path selection logic.