Refactoring use of properties