Made all the important methods work in new threads. This fixes #21