Add routines for connecting to the controller