optimized command modules' code