Cleanup attributesFor
Merge pull request #315 from GrahamCampbell/2.1-cleanup

[2.1] Cleanup attributesFor