Issue #41: Fixed bug in unit test.
Fixed TODO: Use bits type in DeltaMapItem.
Removed TODO: Add comparison and maths to custom types.
Removed TODO: Remove C style casts.
Removed TODO: Log an invalid state condition.