added lua command to configure the lua onTickRate - and other refactorings