refactor command factories

Signed-off-by: Matthew McNew <mmcnew@pivotal.io>