more lua updates, warning fixes, error handling yadda yadda