Move more functionality over to the statelog.