Further reorganization of action code