Created client-side state diagram