Added rank to activity type, and sorted by rank