Change some return values to references
Initial implementation of GeneralSearch