refactoring IR used for plugin into something _much_ easier to work with