Restructured client

No changes to behaviour