Added a few new features to deal with batched msg size and new handlers.