Updated example and fixed some bugs and improved dynamic modals