Clean up pathing code, pt 1.