Finished coarse search algorithm. Now only cosmetic and a few logic
changes are needed. Almost done.