Joetaylor/add defs

@eventualbuddha Let me know any changes you'd like.
Can we make this a `ReferenceError`?