Change struct scheme so that the userdata is just a pointer
Get good reference management system working for structs