Made params of handleMessages clearer