Refactored samples class. All code now uses this class to store samples.