ioctls were added, little refactoring, tests were added