Refactoring. Figure: keep pieces instead of nodes, steal pieces from other figure on join