Added a Marshall function

The Marshall function now takes a Value parameter instead of directly
doing interface{}.
added comments