Downloadclient

@sangv Here are the remaining fixes. I'll also commit the fix to issue #57 here if I can since it needs to be plugged in fast.