Add special case for zero-length strings
Add some basic unit tests