Changed and implemented TestClasses; fixed some bugs