Feature/add node api

Since nodes can be input by users, we'll need to check that the id is not null.  I think it makes sense to put the check in the node constructor since id shouldn't ever be missing.