More work on meta data stuff
misc fixes for recent changes