Refactoring data union to own header file