Switched to IOIOThread-type structure
Added package declaration