Moved $stdin handling from player to io