Implemented Map marshaling and unmarshaling

Feel free to merge this.