Improve the extension interface and update extensions and test accordingly.