Following the paradigm of Distributions, added dim field in samples (and provided basic constructors for the various sample types)