massive rewrite.

Using threads instead of process.
fixed lseek offset
fixed block pointer type
fixed block allocation
fixed smart mode