Refactor getter and setter semantics