Move map, flatMap -> State case class (instead of companion obj)