Refactoring for ifrit, a little (lot) broken