Updated to only carry a max number of messages in memory
The expiration bug is now fixed, but the implementation is inefficient.

There needs to be a better implementation of indexing the messages for
expiration. Whether that is a separate expiration thread or something
remains to be seen. I will look into it.