Fixed extra space.
Removed pointless manual deferred.
Added test.
Separated out the client in a new class. Much more verbose...
...But I can move everything nonessential to a separate file.