switches and other performance improvments. xTest added to learn more about proper gameLoop making