How can compounds be classified?