Added Validators; Fixed some bugs; Added Tests