Stricter ownership of states

Rules now own child states and are responsible for their lifetimes.