Merge pull request #3 from meshulam/rewrite

Return type documentation
fix single value serialization
merge matt's work
Documentation fixes