More work on lua datamodel