1st steps in inserting the PAM (Partitioning Around Medoids) clustering. Needs more tests.