Make the operation take a const reference

Don't know why I wasn't doing this.
Move operation sanity checking to a function

This in theory lets me call it from many places, though I'm not doing
it right now.  I was going to have multiple constructors, but that
didn't happen.
Add a name-only node constructor

This just fills out the default values for everything else.
Add a missing include