Add initial support for extensions

First pass at adding these. There's a bit more I'd like to add, but we can probably split that into a separate PR later.