Fixes in the CompositeSample + other minor changes