some refactorings and initial sampleClient added