write fixed to some degree, mmap working, start of ioctl working