First working prototype. Multiple parents are not supported yet.