[#146] moved the code that controlled the create project dialog into a function