Added tests for the new setting allowEmpty

Added test cases for typical use
Removed useless line of code and added more tests

Removed useless variable setting leaveEmpty. Added more tests to show
proper behavior expectations.
Merge pull request #1 from jpSimkins/allowEmpty

Updated allowEmpty and added tests