general cleaning up of forms and bug fixing