Bug 23273: remove use of dictionary as a attribute and use object