Update to libraries

Merged my latest changes with the main Rinstrum/LUA-LIB.