pre_cmd was being overwritten, use hooks instead
Merge branch 'master' into activevideo