Fix some bugs in models. Added form validation..