Extracted declarations in define-command body to place them properly.
Extracted declarations in define-handler body to place them properly.