Pass userdata everywhere instead of cid (WIP)