Path cleaning - first part