Refactored MetaInfo and meta type a bit so it's easer to run from lua.