Improved documentation
Uses const references
Added hash verification of messages