simplified example lua script.
removed javascript functions to external js file in static directory