Rewrite of indentation, now uses searchpair()