Refactored deposit code.

Now cleaner and provides error message if no file is uploaded.
Fix horrific misnaming of variable.

uid is now sub_id