improved forms and validations

improved error control and fixed some bugs