More tweaks to attribute API