I refactored the way element properties are set from data.