Added copyright to the command files

Added copyright to the command files, and some environment variable
checks