Added lua libs loading code
Small refactor of the scripting module