Added connect/disconnect callback functions.