Additional unit tests, data structure fixes.
Added list segment tests. Fixed a few failing test cases.
Added list segment tests, updated tests for clarity.
Added webhook tests.