Removing warnings, a minor logic fix.
The first automated test for the xid library and the necessary nuts and bolts. Additionally, some minor cleanup.

BugzID:3432