Merged work from soroban into palamedes