Move all handle_cast cases into one function (use "case" to distinguish different message types).