improve tests of getting serializer
better use of high level functions and some tests
add tests for writers