fixes, abstracted fileupload into static class