Update tables and add productionmode option