Done with everything but retriving remotes.  Function calls are untested.