Now cleans up connections.  Fix bugs in population creation.