Added extra code for FindGp and getGP searches.

Added unit tests.