add RLGame class and some changes.