Create a new client class for the web applications only. Move ClientState into webapps.

Only partially completed.