Moved some packages, cleaned up code. added assert in buildfunction, added check if form is filled in before "submitting", now only saves values that user chose (incl. generated) in sequence of form.