Remove code duplication from play module.