Added convenient debug log macro
Improved documentation
Makes expired messages be retrieved from the database as NULLs. Expanded the unit test to test this.