Updated client for v2 support
Removed temp debug code