Refactor master object handling