Close port from the server after we're done.
Make this compile with changes to pkg/util.

Also, add dependencies.