fix path comparison + some cleanup