Added a CommandWithTerm Class

Added new CommandWithTerm Class similar to the CommandWithMeta Class.
Designed to reusable for different object types. Currently this is draft and I am still testing it. Just wonder if I was on the right track with this solution. Feedback is requested. I will write tests when I know that I am on the right track. 

Related #1379
`$success` is a poorly-named variable because it could also be a failure. Let's call it `$result` instead.