Set up code for rule array and final dictionary generation.