Removed debugging.
Updated error handling to be more dynamic.
Added several extra error types.
Updated to use Node module.
Added extra error checks.
Added Node module to store current node.