Multiple changes

- Updated the extension detection code.
- Updated the extension classes so that they can optionally be constructed
  without throwing even if the extension is not available.