Implement record deserialization.

Closes #12.