Merge "Refactor mirror state"