Issue #436: fix bugs, disable Import button if the form doesn't contain all required values, code cleanup