minor refactoring
refactoring parser.    Bug fixed in search