fix speed issue and add close button in embeddable version