Revert "more lib and metadata changes"

This reverts commit 5d1e0fabfdfe29a4c27f7b543e7ef9ef007f4efd.