Rewritten the auto exploring algorithms (still incomplete at this stage).