Hopefully implemented path optimization.