Sixth commit

Manually fixed weird commit thing. Code produces weird thread error.
Runs out of memory.