Use ctype objects instead of strings when casting
Remove garbage code
Use data["name"] instead of data.name to potential reserverd word in name
Initialize record size of _M table according to number of nodes in schema
Style fixes
More style fixes