Put mq and poco variables into separate lua file. Add more checks