Support for extensions

This version now also properly supports the "Ext" family of opcodes.
Also, a few bugs related to integer packing have been fixed.