Fixed most bugs, added support for RI parenting