Especially, I think the format of wallet.dat needs to be documented.
I don't know the subject a lot, but shouldn't the format of wallet.dat only be part of the original implementation internals?
Regardless, internals should be documented.
The reference implementation uses Berkeley DB by the way. (Paragraph added after original post)