add message list method and tests

adds list and filter support for Messages

also an example program
This might be a silly question, but is f ever being used?