Moved lua stuff out of main and into MessageProcessor