Extract important parts of path