refactored path/option config stuff and core logic