Threading done (functional at least)

Merging functional threading allows us to develop new features