Moved command code from main js file to individual files located in command directory.