Optimizing path syntax to make it shorter