Use CURL to get filesize on 32bit systems.
Cast to numeric instead of float, i.e. use an integer if possible.
Refactor Large File handling code.