anchor.diff:      find_free_port([0]);
   find_free_port(Port) ->
       find_free_port([Port]).
  +
  +
  +-spec format(string(), list()) -> string().
  +format(FormatString, Items) ->
  +    lists:flatten(io_lib:format(FormatString, Items)).
  +
  +-spec exec(string()) -> pid().
  +exec(Cmd) ->
  +    _ = spawn(os, cmd, [Cmd]).
  
positive.code: %%%% Helper methods
  %%%%%%%%%%%%%%%%%%%
  -spec find_free_port(comm_server:tcp_port() | [comm_server:tcp_port()] |
                           {From::comm_server:tcp_port(), To::comm_server:tcp_port()})
          -> comm_server:tcp_port().
  find_free_port({From, To}) ->
      find_free_port(lists:seq(From, To));
  find_free_port([Port | Rest]) when is_integer(Port) andalso Port >= 0 andalso Port =< 65535 ->
  
negative.code:     Time = Mega * 1000000 + Secs,
      SpawnFun = 
          fun (X) -> 
                  Port = find_free_port(BaseScalarisPort),
                  YawsPort = find_free_port(BaseYawsPort),
                  NodeName = format("autoscale_~p_~p", [Time, X]),
                  Cmd = format("./../bin/scalarisctl -e -detached -s -p ~p -y ~p -n ~s start", 
                               [Port, YawsPort, NodeName]),
                  ?TRACE("Executing: ~p~n", [Cmd]),
                   NumberVMs = get_number_of_vms(),
                  _ = exec(Cmd),
                  util:wait_for(fun() -> get_number_of_vms() =:= NumberVMs + 1 end)
          end,
      _ = [SpawnFun(X) || X <- lists:seq(1, N), get_number_of_vms() < config:read(cloud_local_max_vms)],
      ok.
  
  -spec remove_vms(non_neg_integer()) -> ok.
  remove_vms(N) ->
      VMs = get_vms(),
      RemoveFun = 
          fun(NodeName) ->						
                  Cmd = format("./../bin/scalarisctl -n ~s gstop", [NodeName]),
                  NumberVMs = get_number_of_vms(),
                  ?TRACE("Executing: ~p~n", [Cmd]),
                  _ = exec(Cmd),
                  util:wait_for(fun() -> get_number_of_vms() =:= NumberVMs - 1 end)
          end,
      _ = [RemoveFun(NodeName) || NodeName <- lists:sublist(VMs, N),
  