Added command tracking for deployments.
Added some comments.