Add better attr handling