Clarified use with another example and simplified state ticking.