Move TeXSample-related code to TexsampleCore class