Made onReceiveData funcs not static.