Add file upload support, internal refactorings, start support of billing API