Updated documentation and fixed regex issues for recognizing paths and reducing context path