Adds the getController function.