Sample preparation and sampling