Some changes to get it compiled.
Hack a fix for hanging uploads and fix some time formats which caused http errors.