Relative (mswin) path fix + minor refactoring