Optimized update, added dirty check on properties.