Improved command registration