Register callbacks for various things