Moved route matching into a separate method named parseToken.