normalize the code and remove some recursion
normalize the code and remove some recursion

fallenpixel/poketrainer,infinitewarp/poketrainer,infinitewarp/poketrainer,fallenpixel/poketrainer,fallenpixel/poketrainer,infinitewarp/poketrainer