Added a createMessage function that pushes a new object to the Messages array