Unit tests now working, took some doing to get settings worked out since each test requires different settings.
Almost all the tests now pass, so implementation is nearly complete.
Still need to implement uploading.