Some refactoring

I didn't get rid of jQuery because it is too useful for this plugin. I even switched the AJAX calls to use it instead of native calls, just because it is way more clear.

I also abstracted out the table data and added a Mustache template for rendering the table.

I don't think there are real improvements, other than just refactoring and organizing to make it clearer and DRYer.