client comments and code refactoring