Moving creating elements before/after into dialog