Fix issue with spaces in filenames

- Fix issue when an uploaded image for the staff directory had a space
in it
- Purged some unused variables
Merge branch 'dev'
Fix issue when uploading files with spaces in the name to the staff directory.
Also purged some unneeded variables