Dev/cartridge refactor