Fix: Old kinks and bugs

Mostly old kinks in the code. Added support for sending uint64 to ioctl.