Refactor parser

avoid splitPath and parsePart methods