Fixed problem with fields named 'type'.
Merge pull request #5 from Californian/issue-4-fields-named-type

Fixed problem with fields named 'type'.