Pending messages, PTR in left drawer, better logging, and database upgra...

...de functionality