Some refactoring of the Attributes system