Finished Refactoring and added Client