Added validation class testing and fixed some bugs

Amazing that there were as many bugs in there as there were.