State encapsulation