Thanks David. I think I've got most of these earlier, and some no longer exist (like the AJAX issue). However others were very helpful/insightful. Thanks.
Quick question on two things:
I'm not sure how use the html_writer to write something like: html_writer::tag('li data-role="list-divider"', $content) in a proper way. Can you point me to some references on using it? Would writing the above like below work for standards purposes?
$attributes['data-role'] = 'list-divider';
$content = html_writer::tag('li', $content, $attributes);
I'm also not sure what you mean in reference to the $this->page->url. Is there some other way of getting the URL?