Cleanup locate & friends

First of a series of PRs aiming at ScalaDoc, submitted for fast merge.