Replace hard-coded values by attributes.