Add client version checker. Remove some unused code