Add state to message functions.

Note: This doesn't do anything yet.