How were chemical compounds classified during the early times?