UNIFYING CONCEPTS IN GRANULAR MEDIA AND GLASSES