core: refactor attribute storage