Fixed up assertions and parentNode logic, everything is looking good