Added client side validation and a couple more tests