Improve TSampleInfo; fix bugs