Pattern parsing refactoring. GODOC fix, etc.