Add some doc blocks
Rename error_collection variable to message_collection