Attribute list stuff

I think this code is useful but I can't be sure. We still need a new view and some JS to fetch a new attribute list when the user chooses a different attribute type.