Impurity spins in solids and single molecular clusters