Last minute fixes, and more progress on the plugin api