Minor fixes, mostly to the cartridge module