Some cleanup.
Started with some more test code using the ioctls.