client refactoring complete, and handler refactinr complete with appid verification bits