Added a lot of the Frontier Search code