Added main.lua

Added main.lua, and all(?) functions