refactor ME for easier adding other search methods
Merge pull request #489 from sijchen/me_refactor22

refactor ME for easier adding other search methods