moving guts into "pyrs" module