factored out rats and piper into npm packages rationals and polyrats