refactor_gym_tonic