Refactoring helpers (WIP)