Add connectivity functions and constructors