Added put_rec utility function and mostly finished link command.