Adding message types and some message receiving logic