Starting on attributes, and some cleanup