lua tweaks and cleaning