Code enhancement and remove some extra attributes