Restructured source
Client was not updating state