Commented all node files and inserted type checking