WIP: Better path and prefs handling