Added package cmd var to avoid passing it around.