add tests for type questions in serializer.
extract stack into shared module.
add specs for the stack.