Use the latest version of api and init chooser when the DOM is fully loaded
Issue #1