Cleaning up extension api internals