Completed Documentation and commenting main.lua