Added more unit tests, and reorganized existing ones.
Added new unit tests, and reorganized existing ones.