Fixed most of the testing errors