Changed the hash struct into an exportable one called Message, also changed all references to it. Refactored the encoding functions to reduce duplicated code in Encoder.go