path logic cleanup