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
Fix formatting