I added a required argument to LuaState(), a string 'name', this is used to add to the key of the functions when storing them in the global map, this is so that two different LuaState objects can have functions with the same names that do not collide, as well, it means registering a function for one LuaState does not make it available to all the others.