more copypaste tests
fix crash with parts and ties; more optimizations