Generalized and refactored fork of phantom_omni