Configuring clients to work with the gateways, not completely done

Cleaned up unused imports and classes, wrote client tests