Removes duplicate attrs and moves some attrs around