Implements user and event state distribution

Use 2 (not 4) spaces for indentation.