make Index and WorkingTree independent of Repository, they only need a CommandLocator. Also use constructor injection instead of field injection.