Make StateChanged a sealed trait (was an abstract class), move it to its own file.