Remove Client Class and some refactoring