Refactored Buffer reading
Added Array tests
Added serializeType option