refactor files and directories. close dialog on create click