Merge pull request #108 from mkoppanen/master

refactor code to be a bit more readable
Separate serializer tests