Added new properties and refactored code