A frame for decoding SmallMods.

Also a few improvements.