Removed unnecessary functions.
Support environment when running commands.