Initial code dump from light refactoring of injectr's base.