factored out PlayGen to new module