Working on #3: initial rejig of metadata lookup and serialisation