Fix gist; add type attribute
Add test; gist
Merge pull request #102 from ppworks/fix_gist

Fix gist; add type attribute