Improve modal layout and add loading