Much better implementation of form validation errors

Form validation errors are now bound to the form that generated them removing duplicate listings. Also cleaned up a lot of code and fixed a few small bugs which went unnoticed.