data model improvement

abstracted FormDialog widget initialization into functions (for less
redundancy and easier maintenance and development)