added namespaces for c function in lua
'rs' for clear and print
'peers' for all peer functions

added wrapper code for lua-api calls
moved existing code to new wrapper code