Use templated getters and setters. Write back only in sync().