Added support for metatables reading and writing