Improved object property code