Adding in error type checks in exp nodes
Some refactoring