added FileUploadService and corresponding test; minor bug fixes