Started refactor for a separate add thread method.

Unit and functional test for happy path.

The rest of the project doesn't really work. Will add back in
functionality piecemeal.