Clean up the attributes module

Get rid of a lot of boilerplate and dead code.

Change-Id: I3d7c1b0fc1e3754335d05bfc2e1a8e3e6c88ca8c
Merge "Clean up the attributes module"