Refactor create dialog builder