Export of Nil and refactoring to behave in a more uniform way