Added callback function to Api connection. Things broke for now.