Refactor kdbx parsing.