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