Scala port of the Inject tool