Added generation for routing and milling layers, restructured generation and control functions.