Release build fixed, refactoring client