more robust metatable typedef

and new meta functions!