minor refactoring
refactoring parser.    Bug fixed in search
Merge branch 'parser'