added view vars to serialize
added tests
added more tests
Merge pull request #72 from chrissPony/master

added view vars to serialize