Fixed tests. Added upload test.