Better performance through multithreading

Multithreading and other minor improvements