Initial commit of some basic connectivity algorithms and related functions.