Added simple event loop
State is not private so rename