Sunday progress!

Future-proofs data layout, adds lock API, adds hashing API