Threading implemented, branch merged in