add some explanatory comments
more doc comments
add TODO about archived messages