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